# -*- coding: utf-8 -*-
# @Time    : 2022/1/11 23:24
# @Author  : 徐翊宸
# @Email   : xyc@163.com
# @File    : page_hfznx.py
# @Software: PyCharm
from selenium.webdriver.common.by import By
from pages.base_page import BasePage


class HfznxPage(BasePage):

    gengduo_locator = (By.LINK_TEXT, "更多")
    znx_locator = (By.LINK_TEXT, "站内信")
    nr_locator = (By.CSS_SELECTOR, "#form1 > table > tbody > tr > td:nth-child(2) > a")
    hf_locator = (By.LINK_TEXT, "回复")
    nrms_locator = (By.CSS_SELECTOR, "#dialog-send > form > table > tbody > tr > td:nth-child(2) > textarea")
    fs_locator = (By.CSS_SELECTOR, "#dialog-send > form > table > tfoot > tr > td:nth-child(2) > input.btn.btn-primary")

    def gengduo_click(self):
        self.driver.find_element(*self.gengduo_locator).click()

    def znx_click(self):
        self.driver.find_element(*self.znx_locator).click()

    def nr_click(self):
        self.driver.find_element(*self.nr_locator).click()

    def hf_click(self):
        self.driver.find_element(*self.hf_locator).click()

    def nrms_input(self, nrms):
        self.driver.find_element(*self.nrms_locator).send_keys(nrms)

    def fs_click(self):
        self.driver.find_element(*self.fs_locator).click()








